#include "Rp2RectTextureEffect.h"

using namespace Rp2;

//---------------------------------------------------------------------------------------------------
RectTextureEffect::RectTextureEffect(const std::string& rkTextureName)
	:
	ShaderEffect(1)
{
/*
	m_eEffect = SE_ORTHO;
	m_bIsRectTexture = true;
	m_iTexQuantity = 1;

	// texture setting
	Tga* tga = new Tga;
	if(!Tga::ReadTGA(rkTextureName.c_str(), tga))
		assert(false);
	if (!tga->GetData())
	{
		assert(false);
	}
	glGenTextures(1, (GLuint*)&m_iTexID[0]);
	glBindTexture(GL_TEXTURE_RECTANGLE, m_iTexID[0]);

	glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
	glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
	glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
	glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_MAG_FILTER, GL_NEAREST);	
	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
	glTexImage2D(GL_TEXTURE_RECTANGLE, 0, tga->GetComponent(), tga->GetWidth(), tga->GetHeight(), 0,
		tga->GetFormat(), GL_UNSIGNED_BYTE, tga->GetData());	

	delete tga;
*/
}
//---------------------------------------------------------------------------------------------------
RectTextureEffect::~RectTextureEffect()
{

}
//---------------------------------------------------------------------------------------------------